package no.ntnu.idi.deid.preprocessor.wordcount;

//Only used for word count purpose hence two simple attributes, word and occurrences are used 

public class Entity implements Comparable<Entity> {

	private String string;
	private int occurrences;

	public Entity(String str, int occ) {
		string = str;
		occurrences = occ;
	}

	public String getString() {
		return string;
	}

	public int getOccurrences() {
		return occurrences;
	}

	@Override
	public int compareTo(Entity o) {
		return -1 * (this.occurrences - o.occurrences);
	}

	public String toString() {
		return string + ": " + occurrences;
	}

}
